Cooperative   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 28
dl 0
loc 32
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A getId 0 3 1
A getName 0 3 1
A getDayDuration 0 3 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class Cooperative {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'varchar', nullable: false })
9
  private name: string;
10
11
  @Column({
12
    type: 'integer',
13
    nullable: false,
14
    default: 420,
15
    comment: 'Stored in minutes'
16
  })
17
  private dayDuration: number;
18
19
  constructor(name: string, dayDuration: number) {
20
    this.name = name;
21
    this.dayDuration = dayDuration;
22
  }
23
24
  public getId(): string {
25
    return this.id;
26
  }
27
28
  public getName(): string {
29
    return this.name;
30
  }
31
32
  public getDayDuration(): number {
33
    return this.dayDuration;
34
  }
35
}
36